package com.onpositive.page.core.wikihelper;

import com.onpositive.richtext.model.BasePartition;
import com.onpositive.richtext.model.BasePartitionLayer;
import com.onpositive.richtext.model.FontStyle;
import com.onpositive.richtext.model.IImageManager;
import com.onpositive.richtext.model.ILineAttributeModel;
import com.onpositive.richtext.model.meta.ITextDocument;
import com.onpositive.richtext.model.meta.RGB;
import com.onpositive.richtexteditor.model.IFontStyleManager;

public class WebLayerManager extends LayerManagerAdapter {

	ITextDocument document;
	IFontStyleManager manager;
	IImageManager iManager;
	BasePartitionLayer layer;

	public WebLayerManager(ITextDocument document, IFontStyleManager manager,
			IImageManager iManager,
			BasePartitionLayer layer) {
		super();
		this.document = document;
		this.manager = manager;
		this.iManager = iManager;
		this.layer = layer;
		linkPrototypePartition = new BasePartition(document, 0, 0);
		linkPrototypePartition.setStyleMask(FontStyle.UNDERLINED);
		linkPrototypePartition.setColorRGB(new RGB(255,0,0));
	}

	BasePartition linkPrototypePartition;

	

	@Override
	public ILineAttributeModel createModel() {
		return null;
	}

	@Override
	public ITextDocument getDocument() {
		return document;
	}

	@Override
	public IFontStyleManager getFontStyleManager() {
		return manager;
	}

	@Override
	public IImageManager getImageManager() {
		return iManager;
	}

	@Override
	public BasePartitionLayer getLayer() {
		return layer;
	}

	@Override
	public int getLineDelimiterLength() {
		return 2;
	}

	@Override
	public BasePartition getLinkPrototype() {
		return linkPrototypePartition;
	}
}
